const inquirer = require('inquirer')
const templates = require('./template')

const generate = require('./generate')

module.exports = (projectName) => {
  const libChoices = ['react', 'vue']
  inquirer.prompt([
    {
      type: 'list',
      name: 'lib',
      message: '请选择 UI 库',
      default: libChoices[1],
      choices: libChoices,
    },
  ]).then(({lib}) => {
    generate(templates[lib], projectName)
  })
}